<?
#=========================================================================
# 功    能: 批量查找帐号，转为昵称，或者昵称查找帐号，分析出不存在用户，显示用户状态         
# 作    者: Tovy
# 最后修改: Tue Jun 17 18:12:26 CST 2008
# 说    明: 
#-------------------------------------------------------------------------

print_r($_POST);die;
header("Content-type: text/html; charset=utf-8"); 
header("Cache-control: private");  ## 加此句后可支持页面回跳

define('ROOT_PATH','../../');

define('IMG_URL','http://static.sg.9wee.com/');

define('DIS_ERR',1);
define('PATH_lOG',ROOT_PATH.'logs/wjg/'); //logs目录
define('ERROR_LOG_FLOG',true); //记录错误sql
define('SQL_LOG_FLOG',false); //记录所有sql
define('HOST_ROOT','http://'.$_SERVER['HTTP_HOST'].'/');
define('SQL_OVER_TIME',0.05);
define('TEST_ENV_FLAG',0);//测试环境标志	

require_once(ROOT_PATH.'include/config/config.php'); //公共包含文件
require_once(ROOT_PATH.'functions/function_1.php');
require_once(ROOT_PATH.'class/Base/Tpl.class.php');
require_once(ROOT_PATH."include/cache/db.cache.php");
//if(get_ip()!='220.248.115.130' ) die('没有权限!');
//$tpl = new  Base_Tpl('activ');

//数据库连接:
		$dbinfo['host']='192.168.0.8';
		$dbinfo['user']='dbashanghai';
		$dbinfo['password']='dbashanghai20070508';
		$dbinfo['database']='sanguo_activ';
if(!empty($dbinfo)) {
	if($dbh = mysql_connect($dbinfo['host'],$dbinfo['user'],$dbinfo['password'])) {
		if(!mysql_select_db($dbinfo['database'])) $dbh_error='select database '.$dbinfo['database'].' 

error';
		$query='set names UTF8';
		if(!mysql_query($query, $dbh)) $dbh_error='select query: '.$query.' error';
	}
	else  $dbh_error='connect database '.$dbinfo['database'].' error';

}
$sql = "select count(*) as num from sg_activ_info where state=1";
$result=sql_get_one($sql,__LINE__);
$num=$result['num'];

$username=$_SESSION['bet_username'];
$area=trim($_GET['area']);
if ($username!=""&&$area!="") {
	$sql = "select * from sg_activ_info where user_account='$username' and area='$area'";
	//echo $sql;die;
	$result=sql_get_one($sql,__LINE__);
	
}
?>



